# Maintainer: Filipe Laíns (FFY00) <lains@archlinux.org>
# Maintainer: Maxime Gauduin <alucryd@archlinux.org>
# Contributor: Frederik “Freso” S. Olesen <freso.dk@gmail.com>

pkgname=lutris
pkgver=0.5.12
pkgrel=3
pkgdesc='Open Gaming Platform'
arch=('any')
url='https://lutris.net'
license=('GPL3')
depends=(
  'cabextract'
  'curl'
  'glib2'
  'gnome-desktop'
  'gtk3'
  'mesa-utils'
  'p7zip'
  'psmisc'
  'python-certifi'
  'python-dbus'
  'python-distro'
  'python-evdev'
  'python-gobject'
  'python-lxml'
  'python-pillow'
  'python-requests'
  'python-yaml'
  'unzip'
  'webkit2gtk'
  'xorg-xrandr'
)
makedepends=(
  'git'
  'meson'
  'ninja'
  'python-poetry-core'
)
checkdepends=(
  'python-nose-cover3'
  'wine'
  'xorg-server-xvfb'
  'xterm'
)
optdepends=(
  'gamemode: Allows games to request a temporary set of optimisations'
  'gvfs: GVFS backend'
  'innoextract: Extract Inno Setup installers'
  'lib32-gamemode: Allows games to request a temporary set of optimisations'
  'lib32-vkd3d: Vulkan 3D support'
  'lib32-vulkan-icd-loader: Vulkan support'
  'vkd3d: Vulkan 3D support'
  'vulkan-icd-loader: Vulkan support'
  'wine: Windows support'
  'xorg-xgamma: Restore gamma on game exit'
)
_tag=10933ba9203a3f008646010005cdf19a6d97552c
source=("git+https://github.com/lutris/lutris.git#tag=${_tag}")
b2sums=('SKIP')

pkgver() {
  cd lutris
  git describe --tags | sed 's/^v//'
}

build() {
  arch-meson lutris build
  ninja -C build
}

#check() {
#  cd $pkgname-$pkgver
#  xvfb-run nosetests --cover-erase --with-xunit --xunit-file=nosetests.xml --with-coverage --cover-package=lutris --cover-xml-file=coverage.xml
#}

package() {
  DESTDIR="${pkgdir}" meson install -C build
}

# vim: ts=2 sw=2 et:
